package se.sll.service.catalogue.common.data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@Data
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@JsonIgnoreProperties(ignoreUnknown = true)
public class ProductReferenceList implements Serializable{
    
    static final long serialVersionUID = 1L;
    
    private List<ProductReference> prList = new ArrayList<ProductReference>();

    public boolean isEmpty(){
        return prList == null || prList.isEmpty();
    }
    
    public boolean addUnit(ProductReference pr){
        return prList.add(pr);
    }
}